// Plugin Functions
#define MAXFILES      80

extern "C"
{
	typedef struct {
		int iValue;
		void *pValue;
	} __declspec(dllexport) PluginData;

	// DLL Ordinals: 0 = Setup
	typedef __declspec(dllexport) void (*TDllPluginFunction)(int ordinal, PluginData *app);

	// App Message Function (Handler)
	typedef __declspec(dllexport) void (*TAppMessageFunction)();

	// app->pValue will be set to pData.
	// app->iValue will be set to 1.
	__declspec(dllexport) void AppMessage(PluginData* app, PluginData* pData);
	
	// app->pValue should be pointer to AppMessageFunction.
	// app->iValue should be 1.
	__declspec(dllexport) void AppAttach(PluginData* app);
	
	// sets all members in app to 0
	__declspec(dllexport) void AppDetach(PluginData* app);

	// returns all DLL modules in the order they were loaded
	__declspec(dllexport) HMODULE* GetDllModules();

	// returns number of loaded DLL plugins
	__declspec(dllexport) int GetNumDllModules();

	// returns the application pointer
	__declspec(dllexport) PluginData* GetPluginApp();
}